# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
#
# NOTE: Roboto 2.x (the "original" Roboto) is crippled for compatibility with
#  legacy systems. Roboto (Classic) 3.x is a fixed version intended to be 1:1
#  match with the latest version of the "original" Roboto and uses the same
#  font name. There's also Roboto Flex, a modernized successor of the latter,
#  which uses a new name (Roboto Flex) - we package it separately.
pkgname=font-roboto
_fontname=${pkgname#font-}
pkgver=3.005
pkgrel=0
pkgdesc="Google Roboto (Classic) font"
url="https://github.com/googlefonts/roboto-classic"
arch="noarch"
license="Apache-2.0"
depends="fontconfig mkfontscale"
source="https://github.com/googlefonts/roboto-classic/releases/download/v$pkgver/Roboto_v$pkgver.zip
	45-$_fontname.conf
	"
options="!check"  # no code to test
builddir="$srcdir"

package() {
	install -Dm644 unhinted/static/Roboto*.ttf -t "$pkgdir"/usr/share/fonts/$_fontname/

	cd "$pkgdir"

	install -Dm644 "$srcdir"/45-$_fontname.conf -t etc/fonts/conf.avail/
	mkdir -p etc/fonts/conf.d
	ln -s ../conf.avail/45-$_fontname.conf etc/fonts/conf.d/
}

sha512sums="
bd15b71ed14830d15bb13ad70b2d2ef61f8f6a9b35010cffa2b6a8a4645ad695dea00464c83090c3d8b94ea6b0a3d1ab11b3b4f92e4ba49b331ab87de7219da5  Roboto_v3.005.zip
f9f0429e6b63f3ba905383d5fb07a4ed9c5293eba35e957b028d943f6e8da6ff1ab0d5422e7b5a27b4f9559b47f1f7a0c5ce5e1ce852c15f999868d85b11e971  45-roboto.conf
"
